package com.zmx.promote.entity;

import com.zmx.common.common.entitys.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author zhaomxr
 * null
 */
@Data
@Entity
@Table(name = "promote_active")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper=true)
@Inheritance(strategy = InheritanceType.JOINED)
public class PromoteActive extends BaseEntity {

	/**
	 * 活动名称
	 */
	@Column(name = "name")
	private String name;

	/**
	 * 活动开始时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "begin_date")
	private java.util.Date beginDate;

	/**
	 * 活动结束时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "end_date")
	private java.util.Date endDate;

	/**
	 * 是否生效
	 */
	@Column(name = "is_vaild")
	private Integer isVaild;

	/**
	 * 排名等级
	 */
	@Column(name = "ranking")
	private Integer ranking;

	/**
	 * 活动类型  0-普通活动，1秒杀活动，2精选生活，3轮播图展示活动，4订单支付成功页推荐, 5首页推荐
	 */
	@Column(name = "type")
	private Integer type;
}
